package rattlesnake.callback.util;

import com.google.gson.Gson;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rattlesnake.callback.modle.vo.ResponseVo;

/**
 * @Package: rattlesnake.callback.util
 * @Description: 接受各品类返回的信息
 * @author: liuxin
 * @date: 17/4/10 下午8:01
 */
public class MessageUtil {
    private static final Logger logger= LoggerFactory.getLogger(MessageUtil.class);
    private static final Gson gson=new Gson();
    /**
     * 得到code
     *
     * @param resBoby
     * @return
     */
    public static ResponseVo getResponseVo(String resBoby) {
        if (StringUtil.isEmpty(resBoby)) {
            return null;
        }
        ResponseVo OrderData = gson.fromJson(resBoby, ResponseVo.class);//json转Resvo取到data
        return OrderData;
    }
}
